import React, { memo, useEffect } from 'react'
import { Loading, ActivityIndicator } from 'zarm'

const divStyle = {
	height: '100vh',
	width: '100%',
	display: 'flex',
	justifyContent: 'center',
	alignItems: 'center',
}

const LoadingFrame: React.FC = memo(function () {
	useEffect(() => {
		Loading.show({
			content: <ActivityIndicator size='lg' />,
		})
		return () => {
			Loading.hide()
		}
	}, [])
	return <div style={divStyle}></div>
})

export default LoadingFrame
